         was-drawing? (or (get-in previous-state [:drawing :in-progress?])
                          (get-in previous-state [:drawing :moving?]))
         original-layers (get-in previous-state [:drawing :original-layers])
-        layers        (map #(dissoc % :points) (get-in current-state [:drawing :layers]))]
+        layers        (mapv #(dissoc % :points) (get-in current-state [:drawing :layers]))]
     (cond
      (and (not= type "touchend")
           (not= button 2)

  (let [[rx ry] (cameras/screen->point (:camera state) x y)
        ;; TODO: better way to get selected layers
        db @(:db state)
        layers (map #(ds/touch+ (d/entity db %)) layer-eids)
        [group-id & entity-ids :as used-ids] (take (inc (count layers)) (:entity-ids state))
        group-layer (assoc (ds/touch+ (d/entity db group-eid))
                      :layer/child (set entity-ids)

  "Finalizes layer translation"
  [state]
  (-> state
      (update-in [:drawing :layers] (fn [layers] (mapv #(dissoc % :layer/current-x :layer/current-y) layers)))
      (assoc-in [:drawing :moving?] false)
      (assoc-in [:mouse :down] false)))

