     shipgraph: shipgraph
   componentDidMount: ->
     window.addEventListener 'game.response', @handleResponse
-    window.addEventListener 'secretary.load', @pluginDidLoad
-    window.addEventListener 'secretary.unload', @pluginDidUnload
+    window.addEventListener 'secretary.unload', @pluginWillUnload
+    @pluginDidLoad()
   componentWillUnmount: ->
     window.removeEventListener 'game.response', @handleResponse
-    window.removeEventListener 'secretary.load', @pluginDidLoad
-    window.removeEventListener 'secretary.unload', @pluginDidUnload
+    window.removeEventListener 'secretary.unload', @pluginWillUnload
 
   pluginDidLoad: ->
     if @state.notifySecretary > 0
       @updateNotifyConfig(@state.notifySecretary)
 
-  pluginDidUnload: ->
+  pluginWillUnload: ->
     for key, id of CONFIG
-      config.set(key, null)
+      config.set(key)
 
   handleResponse: (e) ->
     {method, path, body, postBody} = e.detail


  handleDisable: ->
    for key, id of CONFIG
      config.set(key, null)
    config.set('plugin.secretary.ship', -1)
    @setState
      notifySecretary: -1


module.exports =
  reactClass: SecretaryArea
  pluginWillUnload: ->
    window.dispatchEvent new Event 'secretary.unload'
