           c (reaction
              (swap! c-changed inc)
              (+ 10 @a2))
-          res (run!
-               (if (< @a2 1) @b @c))]
+          res (ar (fn []
+                    (if (< @a2 1) @b @c)))]
       (is (= @res (+ 2 @a)))
       (is (= @b-changed 1))
       (is (= @c-changed 0))
              
       (reset! a -1)
-      (is (= @res (+ 2 @a)))
+      (is (= @b-changed 1))
+      (sync)
+
       (is (= @b-changed 2))
       (is (= @c-changed 0))
+      (is (= @res (+ 2 @a)))
              
       (reset! a 2)
+      (sync)
+      (is (= @b-changed 3))
+      (is (= @c-changed 1))
       (is (= @res (+ 10 @a)))
-      (is (<= 2 @b-changed 3))
-      (is (= @c-changed 1))
              
       (reset! a 3)
+      (sync)
+      (is (= @b-changed 3))
+      (is (= @c-changed 2))
       (is (= @res (+ 10 @a)))
-      (is (<= 2 @b-changed 3))
+             
+      (reset! a 3)
+      (sync)
+      (is (= @b-changed 3))
       (is (= @c-changed 2))
-             
-      (reset! a 3)
       (is (= @res (+ 10 @a)))
-      (is (<= 2 @b-changed 3))
-      (is (= @c-changed 2))
              
       (reset! a -1)
       (is (= @res (+ 2 @a)))

          c (reaction (dec @a))
          d (reaction (str @b))
          res (rv/atom 0)
          cs (run!
              (reset! res @d))]
      (is (= @res "1"))
      (dispose cs))
    ;; should be broken according to https://github.com/lynaghk/reflex/issues/1

                              :on-dispose #(reset! disposed-c true))
          res (rv/atom nil)
          cns (rv/make-reaction #(reset! res @c)
                                :auto-run :async
                                :on-dispose #(reset! disposed-cns true))]
      (sync)
      (is (= @res 2))
      (is (= (+ 4 runs) (running)))
      (is (= @count-b 1))
      (reset! a -1)
      (is (= @res 2))
      (sync)
      (is (= @res 1))
      (is (= @disposed nil))
      (is (= @count-b 2))
      (is (= (+ 4 runs) (running)) "still running")
      (reset! a 2)
      (sync)
      (is (= @res 1))
      (is (= @disposed true))
      (is (= (+ 2 runs) (running)) "less running count")

      (reset! disposed nil)
      (reset! a -1)
      (sync)
      ;; This fails sometimes on node. I have no idea why.
      (is (= 1 @res) "should be one again")
      (is (= @disposed nil))
      (reset! a 2)
      (sync)
      (is (= @res 1))
      (is (= @disposed true))
      (dispose cns)
