    for a given device."
   [dev]
   (vec (doall (for [prop (pre-init-property-names dev)]
-                [prop (core getProperty prop)]))))
+                [prop (core getProperty dev prop)]))))
 
 (defn apply-property-settings
   "Sets the state of properties 'dev-prop' to value"

(ns org.micromanager.reloader
  (:use [clojure.java.io :only (file copy)]
        [clojure.data :only (diff)]

  [module housekeeping-fn]
  (let [devs (doall (get (devices-in-each-module) module))
        dev-settings-map (zipmap devs
                                 (doall (map read-device-startup-settings devs)))
        ports (set (remove nil? (map :port (vals dev-settings-map))))]
    (core unloadLibrary module)
    (housekeeping-fn)
    (dorun (map reload-device ports))
    (doseq [dev devs]
      (startup-device dev (dev-settings-map dev)))))

