     ; If collapse routine returns a channel...
     ; then wait for it before spawning a new piece.
     (if-let [collapse-anim (go-go-collapse!)]
-      (go (<! collapse-anim) (spawn-piece!))
-      (spawn-piece!))))
+      (go (<! collapse-anim) (try-spawn-piece!))
+      (try-spawn-piece!))))
 
 (defn go-go-gravity!
   "Starts the gravity routine."


(defn init []
  (size-canvas!)
  (spawn-piece!)
  (add-key-events)
  (go-go-gravity!)


  []
  (js/console.log "game over"))

(defn spawn-piece! 
  "Spawns a random piece at the starting position."
  [piece]
    (swap! state assoc :piece piece
                       :position start-position))

(defn try-spawn-piece!
  "Checks if new piece can be written to starting position."
  []
  (let [piece (get-rand-piece)
        [x y] start-position
        board (:board @state)]
    (if (piece-fits? piece x y board)
      (spawn-piece! piece)
      (game-over))))

(defn collapse-rows!
  "Collapse all filled rows."
