Import NDN.js last because it has global objects which need the above to be defined.
diff --git a/js/Helper.js b/js/Helper.js
index 20dd081..02e33fc 100644
--- a/js/Helper.js
+++ b/js/Helper.js
@@ -14,8 +14,6 @@
 }
 console.log(path);
 
-document.write('<script type="text/javascript" src="' + path + 'NDN.js"></script>');
-
 document.write('<script type="text/javascript" src="' + path + 'WebSocketTransport.js"></script>');
 
 document.write('<script type="text/javascript" src="' + path + 'util/CCNProtocolDTags.js"></script>');
@@ -56,6 +54,8 @@
                 
 document.write('<script type="text/javascript" src="' + path + 'security/KeyManager.js"></script>');
 
+document.write('<script type="text/javascript" src="' + path + 'NDN.js"></script>');
+
 document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn.js"></script>');
 document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn2.js"></script>');
 document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa.js"></script>');