 (defn process-events [vis event-delay event-handlers event-ch step-ch render-ch]
   (go-loop [num-events 0]
     (when-let [[actx loc [verb step & args]] (<! event-ch)]
-      (let [deltas ((get (get event-handlers verb) step) vis actx args)
+      (let [deltas ((get (get event-handlers verb) step) vis actx loc args)
             event-str (str num-events ": " (last actx) " " verb " " step " " args " " loc)]
         (when (and (not (zero? @event-delay)) (some #(not (:after %)) deltas))
           (>! render-ch [@vis deltas false event-str])

               (swap! vis #(dissoc-in % [:chs ch])))
             [{:delta :take :msg msg :ch ch :actx actx :ch-name ch-name}])}
   :aput
   {:before (fn [vis actx [ch-name ch msg]]
              (swap! vis #(-> %
                              (assoc-in [:actxs actx :wait-chs ch] [:put ch-name])
                              (vis-add-ch ch nil)
                              (assoc-in [:chs ch :msgs msg] true)))
              [{:delta :put :msg msg :actx actx :ch ch :ch-name ch-name}])
    :after (fn [vis actx [ch-name ch msg result]]
             (swap! vis #(-> %
                             (dissoc-in [:actxs actx :wait-chs ch])))
               ; NOTE: Normally we should cleanup ch when nil result but
               ; looks like CLJS async always incorrectly returns nil from >!.
               nil)}
   :aalts
   {:before (fn [vis actx [ch-names ch-bindings]]
              (let [; The ch-actions will be [[ch :take] [ch :put msg] ...].
                    ch-actions (map #(if (coll? %) [(first %) :put (second %)] [% :take])
                                    ch-bindings)

                                   [{:delta :put :msg (first msgv) :actx actx :ch ch
                                     :ch-name (when use-names (nth ch-names idx))}]))
                               ch-actions)))))
    :after (fn [vis actx loc [ch-names ch-bindings [result-msg result-ch]]]
             (let [ch-actions (map #(if (coll? %) [(first %) :put (second %)] [% :take])
                                   ch-bindings) ; ch-actions = [[ch :take] [ch :put] ...].
                   use-names (and (coll? ch-names)
                                  (= (count ch-names)
                                     (count ch-bindings)))]
