     nil))
 
 (defn run-animation* [owner start-ms current-ms tick-state min-tick max-tick]
-  (if (and (om/mounted? owner)
-           (seq (:ticks tick-state)))
+  (if-not (and (om/mounted? owner)
+               (seq (:ticks tick-state)))
+    nil;(js/console.profileEnd)
     (let [latest-tick (int (/ (- current-ms start-ms)
                               (:tick-ms tick-state)))
           tick-range (vec (range min-tick (inc latest-tick)))
           ticks (-> (filter #(contains? (:keyframes tick-state) %) tick-range)
                   set
                   (conj (middle-elem tick-range)))]
-      (doseq [tick ticks]
+      (doseq [tick (sort ticks)]
         (when-let [tick-fn (get-in tick-state [:ticks tick])]
           (tick-fn owner)))
       (utils/rAF (fn [timestamp]

                 (run-animation* owner timestamp timestamp tick-state 0 max-tick)))))

(defn cleanup [owner]
  ((om/get-shared owner :cast!) :subscriber-updated {:client-id (ffirst state/subscriber-bot)
                                                     :fields {:mouse-position nil
                                                              :layers nil}}))

(defn signup-button [document owner]
  (reify

                                                         (/ (- end-tick start-tick pause-ticks)
                                                            relative-tick)))]
                                ((om/get-shared owner :cast!)
                                 :subscriber-updated {:client-id (:client-id state/subscriber-bot)
                                                      :fields (merge state/subscriber-bot {:mouse-position [start-x (- start-y (/ text-height 2))]
                                                                                           :show-mouse? true
                                                                                           :layers [(assoc base-layer
                                                                                                           :layer/text (apply str (take letter-count text))
                                                                                                           :layer/current-x end-x
                                                                                                           :layer/current-y end-y)]
                                                                                           :tool :text})})))))
                tick-state
                (map int
                     (range 0
