diff --git a/static/js/embed.js b/static/js/embed.js
index 28d23a073e167218655c93901be837dbebd17510..ab9f7363e0013e7953caed7bf7769d098b284b77 100644
--- a/static/js/embed.js
+++ b/static/js/embed.js
@@ -5,8 +5,8 @@ BusMap.Embed = function(opts) {
 
     /* Constructor - initialize the embed form */
     function init() {
-        populateOptions();
         bindEventHandlers();
+        populateOptions();
     }
 
     var updateEmbedCode = function() {
diff --git a/static/js/map.js b/static/js/map.js
index b780ebb1bbef64f6a591f1e822bba356c2f0aa4c..197b92061cb600cbcbb1ff5b58d735cd2b32c5cf 100644
--- a/static/js/map.js
+++ b/static/js/map.js
@@ -26,6 +26,7 @@ BusMap.Map = function(opts) {
             animate: false,
             reset: true,
         };
+
         that.map = that.opts.mapElement;
         that.leaflet = L.map(that.map, mapOptions)
             .fitBounds(that.opts.bounds)
@@ -52,7 +53,7 @@ BusMap.Map = function(opts) {
         }
 
         // Hide any opened modals when map is clicked.
-        $(that.map).on('click', hideModal);
+        $(that.map).on('mousedown', hideModal);
 
         // Show/hide markers based on zoom.
         that.leaflet.on('zoomend', zoomShowHide);
@@ -439,13 +440,15 @@ BusMap.Map = function(opts) {
         if (that.hashChangedProgrammatically ) {
             // Ignore hash changes caused programmatically (would inf-loop).
             delete that['hashChangedProgrammatically'];
-            return;
+            return false;
         }
         if (that.opts.hashListen == false) {
-            return;
+            return false;
         }
         var hash = window.location.hash.substring(1);
-        if (hash == "") return;
+        if (hash == "") {
+            return false;
+        }
         var parts = hash.split(";");
         // First part: view string (lat,lon,zoom; vehicle; or stop)
         applyViewString(parts[0]);
@@ -453,6 +456,7 @@ BusMap.Map = function(opts) {
         if (parts.length > 1) {
             showModal(parts[1]);
         }
+        return true;
     }
 
     function setUrlFromView() {
diff --git a/templates/modal-embed.html b/templates/modal-embed.html
index fe051a1ae9634a1079878cfa80fc82b8313008ea..122708ce021bf61e0a1cb745baa46bd59c1c75b8 100644
--- a/templates/modal-embed.html
+++ b/templates/modal-embed.html
@@ -10,7 +10,7 @@
 <h3>Preview</h3>
 <div id="embed-preview">
     <iframe
-         src="{{ url_for('map_embed', mode='m', _external=True, _scheme='') }}"
+         src=""
          frameborder=0></iframe>
 </div>
 <h3>Options</h3>