 
   vmOff: ->
     if not @recentState? or @recentState.state is 'RUNNING'
-      @vmUnprepareAndStop onProgress: (update) =>
+      @vmStopAndUnprepare onProgress: (update) =>
         @emit 'vm.stop.progress', update
     else
       Promise.cast true

class OsKite extends KDKite

  api = 
    exec            : 'exec'

    appInstall      : 'app.install'

    fsGetInfo       : 'fs.getInfo'
    fsSetPermissions: 'fs.setPermissions'
    fsRemove        : 'fs.remove'

    fsEnsureNonexistentPath: 'fs.ensureNonexistentPath'
    fsWriteFile     : 'fs.writeFile'
    fsRename        : 'fs.rename'
