         dbg()
         @_action
             action : 'stop'
-            wait   : (project) -> project.state?.state in ['opened', 'closed']
+            wait   : (project) -> project.getIn(['state', 'state']) in ['opened', 'closed']
             cb     : cb
 
     # this is a no-op for Kubernetes; this was only used for serving

    get: =>
        return @synctable.get(@project_id)

    dbg: (f) =>
        if not @logger?
            return ->


        dbg("request action to happen")
        @client.database._query
            table     : 'projects'
            jsonb_set :
                action_request :
                    action  : opts.action
                    started : new Date()
