                 (if (:edit state)
                   [:span
                    [:button.big {:on-click #(end-edit owner)} "Cancel"]
-                   [:button.big {:on-click #(save-deck owner)} "Save"]]
+                   [:button.big {:on-click #(save-deck cursor owner)} "Save"]]
                   [:span
                    [:button.big {:on-click #(handle-delete cursor owner)} "Delete"]
                    [:button.big {:on-click #(edit-deck owner)} "Edit"]])

           [:div.deck-collection
            (if (empty? decks)
              [:h4 "You have no deck"]
              (for [deck (:decks cursor)]
                [:div.deckline {:class (when (= (:deck state) deck) "active")
                                :on-click #(om/set-state! owner :deck deck)}
                 [:img {:src (image-url (:identity deck))}]
                 [:h4 (:name deck)]
                 [:p (get-in deck [:identity :title])]]))]]

          [:div.decklist

      (let [add-channel (om/get-state owner :add-channel)]
        (go (while true
              (let [line (<! add-channel)]
                ;; (println line)
                (-> ".deckedit textarea" js/$ (.append line))
                (handle-edit owner))))))

    om/IDidUpdate
    (did-update [this prev-props prev-state]
      (if (and (not (empty? decks)) (not (:deck prev-state)))
        (om/set-state! owner :deck (first (sort-by :date > decks)))))

    om/IRenderState
    (render-state [this state]
