   [loc]
   (zip/append-child (zip/down loc) {:tag :consumer-window-size :content ["1"]}))
 
-(defn looking-at? [tag loc]
-  (= tag (:tag (zip/node loc))))
-
 (defn append-system-properties [loc]
-  (if (looking-at? :extensions loc)
-    (if-not (looking-at? :system-properties (zip/right loc))
-      (zip/insert-right loc {:tag :system-properties}))))
+  (if (looking-at? :system-properties (zip/right loc))
+    loc
+    (zip/insert-right loc {:tag :system-properties})))
+
+(defn fix-extensions [loc]
+  (add-extensions (append-system-properties loc)))
 
 (defn prepare-zip
   [file]

    (zip/root loc)
    (recur (zip/next
            (cond
             (looking-at? :extensions loc) (do (append-system-properties loc) (add-extensions loc))
             (looking-at? :profile loc) (fix-profile loc)
             (looking-at? :periodic-rotating-file-handler loc) (add-logger-levels loc)
             (looking-at? :virtual-server loc) (set-welcome-root loc)

  (def polyglot-modules
    ["hasingleton"]))

(defn looking-at? [tag loc]
  (= tag (:tag (zip/node loc))))

(defn install-module [module-dir]
  (let [name (second (re-find #"immutant-(.*)-module" (.getName module-dir)))
