     atom.workspaceView.command 'stacktrace:follow-call', ->
       NavigationView.current()?.navigateToCalled()
 
-    atom.workspace.eachEditor decorate
-    @activeChanged = Stacktrace.on 'active-changed', (e) ->
+    subs.push atom.workspace.eachEditor decorate
+    subs.push Stacktrace.on 'active-changed', (e) ->
       cleanup()
       if e.newTrace?
         decorate(e) for e in atom.workspace.getEditors()


    StacktraceView.registerIn(atom.workspace)

    @acceptTrace = atom.on 'stacktrace:accept-trace', ({trace}) =>
      for trace in Stacktrace.parse(trace)
        trace.register()
        atom.workspace.open trace.getUrl()

  deactivate: ->
    @navigationView.remove()

    sub.off() for sub in subs
