 
     ipc.on 'open', (processId, routingId, pathsToOpen) =>
       if pathsToOpen?.length > 0
-        @open(pathsToOpen)
+        @openPaths(pathsToOpen)
       else
         pathsToOpen = dialog.showOpenDialog title: 'Open', properties: ['openFile', 'openDirectory', 'multiSelections', 'createDirectory']
-        @open(pathsToOpen) if pathsToOpen?
+        @openPaths(pathsToOpen)
 
     ipc.on 'new-window', =>
       @open()

      if @testMode
        @runSpecs(true)
      else
        @open(@pathsToOpen)

  removeWindow: (window) ->
    @windows.splice @windows.indexOf(window), 1

    fs.unlinkSync @socketPath if fs.existsSync(@socketPath)
    server = net.createServer (connection) =>
      connection.on 'data', (data) =>
        {pathsToOpen, pidToKillWhenClosed} = JSON.parse(data)
        @openPaths(pathsToOpen, pidToKillWhenClosed)

    server.listen @socketPath
    server.on 'error', (error) -> console.error 'Application server failed', error
