     id = model.id
     termView.id = id
 
-    termView.onExit () ->
+    subscriptions.add termView.onExit () ->
       Terminals.remove id
       disposable.dispose()
 
-    termView.onDidChangeTitle () ->
+    subscriptions.add termView.onDidChangeTitle () ->
       if forkPTY
         model.title = termView.getTitle()
       else


    item = pane.addItem termView
    pane.activateItem item
    termView

  pipeTerm: (action) ->

Terminals = require './lib/terminal-model'
{Emitter}  = require 'event-kit'
keypather  = do require 'keypather'
{CompositeDisposable} = require 'event-kit'

capitalize = (str)-> str[0].toUpperCase() + str[1..].toLowerCase()

