 
   subscribeToActivationEvents: () ->
     return unless @metadata.activationEvents?
+    if _.isArray(@metadata.activationEvents)
+      rootView.command(event, @handleActivationEvent) for event in @metadata.activationEvents
+    else
+      rootView.command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
 
-    activateHandler = (event) =>
-      bubblePathEventHandlers = @disableEventHandlersOnBubblePath(event)
-      @deferActivation = false
-      @activateNow()
-      $(event.target).trigger(event)
-      @restoreEventHandlersOnBubblePath(bubblePathEventHandlers)
-      @unsubscribeFromActivationEvents(activateHandler)
+  handleActivationEvent: (event) =>
+    bubblePathEventHandlers = @disableEventHandlersOnBubblePath(event)
+    @activateNow()
+    $(event.target).trigger(event)
+    @restoreEventHandlersOnBubblePath(bubblePathEventHandlers)
+    @unsubscribeFromActivationEvents()
 
+  unsubscribeFromActivationEvents: ->
     if _.isArray(@metadata.activationEvents)
-      rootView.command(event, activateHandler) for event in @metadata.activationEvents
+      rootView.off(event, @handleActivationEvent) for event in @metadata.activationEvents
     else
-      rootView.command(event, selector, activateHandler) for event, selector of @metadata.activationEvents
-
-  unsubscribeFromActivationEvents: (activateHandler) ->
-    if _.isArray(@metadata.activationEvents)
-      rootView.off(event, activateHandler) for event in @metadata.activationEvents
-    else
-      rootView.off(event, selector, activateHandler) for event, selector of @metadata.activationEvents
+      rootView.off(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
 
   disableEventHandlersOnBubblePath: (event) ->
     bubblePathEventHandlers = []

    syntax.addGrammar(grammar) for grammar in @grammars
    syntax.addProperties(path, selector, properties) for [path, selector, properties] in @scopedProperties

    if @deferActivation and not immediate
      @subscribeToActivationEvents()
    else
      @activateNow()

      @loadStylesheets()
      @loadGrammars()
      @loadScopedProperties()
      if @metadata.activationEvents?
        @registerDeferredDeserializers()
      else
        @requireMainModule()
