             (let [type (:type collection)
                   id (:id collection)]
               (rs/emit! (di/select-collection type id))))]
-    (let [images (count (:images collection))]
+    (let [images (count (:images collection []))]
       [:li {:on-click on-click
             :class-name (when selected? "current")}
        [:span.element-title (:name collection)]

         [:li {:class-name (when own? "current")
               :on-click (partial select-tab :own)}
          "YOUR LIBRARIES"]]
        (nav-section type selected)]])))

;; --- Grid



(mx/defc content
  {:mixins [mx/static]}
  [{:keys [type id selected] :as state} coll]
  (let [own? (= type :own)]
    (when coll
      [:section.dashboard-grid.library
       (page-title coll)
       (grid state)
       (when (seq selected)
         (grid-options coll))])))

;; --- Menu

(mx/defc menu
  {:mixins [mx/static mx/reactive]}
  [coll]
  (let [state (mx/react dashboard-ref)
        ordering (:order state :name)
        filtering (:filter state "")
        icount (count (:images coll))]
    (letfn [(on-term-change [event]
