Merge branch 'sigverify'
diff --git a/js/ndnProtocol.xpi b/js/ndnProtocol.xpi
index e492c80..ee52e38 100644
--- a/js/ndnProtocol.xpi
+++ b/js/ndnProtocol.xpi
Binary files differ
diff --git a/js/ndnProtocol/content/ndnToolbar.js b/js/ndnProtocol/content/ndnToolbar.js
index 3d000f3..20518a3 100644
--- a/js/ndnProtocol/content/ndnToolbar.js
+++ b/js/ndnProtocol/content/ndnToolbar.js
@@ -51,5 +51,4 @@
    document.getElementById("ndnHubLabel").setAttribute("value", "Hub: " + host + ":" + port);
 }
 
-// Assume that addNdnHubChangedListener is defined since we imported NdnProtocolInfo.jsm above.
-addNdnHubChangedListener(onNdnHubChanged);
+window.addEventListener("load", function() { addNdnHubChangedListener(onNdnHubChanged); }, false);
diff --git a/js/ndnProtocol/modules/NdnProtocolInfo.jsm b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
index 553e1ba..a2fb10d 100644
--- a/js/ndnProtocol/modules/NdnProtocolInfo.jsm
+++ b/js/ndnProtocol/modules/NdnProtocolInfo.jsm
@@ -17,9 +17,19 @@
 
 /*
  * When the NDN hub host or port is changed, the system calls listener(host, port).
+ * If the current host and port are not null, call listener with the values to initialize.
  */
 function addNdnHubChangedListener(listener) {
     ndnHubChangedListenerList.push(listener);
+    
+    if (ndnHubHost != null && ndnHubPort != null) {
+        try {
+            listener(ndnHubHost, ndnHubPort);
+        }
+        catch (ex) {
+            // Ignore error from the listener.
+        }
+    }
 }
 
 /*