 
     (callback) ->
 
-      if denyMachine
-        environmentDataProvider.getIDEFromUId(machine.get('uid'))?.quit()
+      ideApp?.quit()  if denyMachine
 
       actionType = if machine.get('type') is 'collaboration'
       then 'COLLABORATION_INVITATION_REJECTED'


      return callback()  unless machine.get('type') is 'collaboration'

      { channel } = kd.singletons.socialapi
      workspace   = machine.get('workspaces').first()
      channelId   = workspace.get 'channelId'

    when 'shared'         then isPermanent
    when 'collaboration'  then not isPermanent

  ideApp = environmentDataProvider.getIDEFromUId machine.get('uid')

  async.series([
    (callback) ->

