       sessions = storage.getValue 'savedSessions'
       return  unless sessions?.length
 
-      notify
+      @notify
         title     : "Checking for previous sessions"
         cssClass  : "success"
 

    """


  notify = do ->

    notification = null


      {recentState} = osKite
      if recentState?.state is 'RUNNING'
      then @prepareAndRunTerminal vm
      else @notify cssClass : 'error'

  prepareAndRunTerminal: (vm, mode = 'create') ->
    {vmController} = KD.singletons
    osKite =
      if KD.useNewKites
      then vmController.kites.oskite[vm.hostnameAlias]
      else vmController.kites[vm.hostnameAlias]

    {recentState}  = osKite

    if recentState?.state is 'RUNNING'
