         mouse-dragged-fn  (or (:mouse-dragged options) (fn [] nil))
         mouse-entered-fn  (or (:mouse-entered options) (fn [] nil))
         mouse-exited-fn   (or (:mouse-exited options) (fn [] nil))
-        mouse-clicked-fn  (or (:mouse-exited options) (fn [] nil))
+        mouse-clicked-fn  (or (:mouse-clicked options) (fn [] nil))
         focus-gained-fn   (or (:focus-gained options) (fn [] nil))
         focus-lost-fn     (or (:focus-lost options) (fn [] nil))
         setup-fn          (fn []

       (.size *applet* (int width) (int height) renderer))))

(defn applet
  [& opts]
  (let [options           (merge {:size [500 300]} (apply hash-map opts))
        fns               (dissoc options :name :title :size :key-pressed
                                  :key-released :key-typed :mouse-pressed
                                  :mouse-released :mouse-moved :mouse-dragged
                                  :focus-gained :focus-lost :mouse-entered

    prx))

(defmacro defapplet
  "Define and start an applet and bind it to a var with the symbol
  app-name. If any of the options to the various callbacks are
  symbols, it wraps them in a call to var to ensure they aren't
  inlined and that redefinitions to the original fns are reflected in
  the visualisation. See applet for the available options."
  [app-name & opts]
  (let [opts  (mapcat (fn [[k v]] [k (if (symbol? v) `(var ~v) v)]) (partition 2 opts))]
    `(def ~app-name (applet ~@opts))))
