         [:div.element-icon i/folder]
         (shape-name item)
         [:span.toggle-content
-         {:on-click toggle-open
-          :class (when open? "inverse")}
+         {:on-click toggle-collapse
+          :class (when-not collapsed? "inverse")}
          i/arrow-slide]]
-       (if open?
+       (if-not collapsed?
          [:ul
-          (for [shape (map #(get shapes-by-id %) (:items item))
+          (for [shape (map #(get shapes-map %) (:items item))
                 :let [key (str (:id shape))]]
             (if (= (:type shape) :group)
               (-> (layer-group shape selected)

      [:div.tool-window-close {:on-click close} i/close]]
     [:div.tool-window-content
      [:ul.element-list {}
       (for [shape (map #(get shapes-by-id %) (:shapes page))
             :let [key (str (:id shape))]]
         (if (= (:type shape) :group)
           (-> (layer-group shape selected)

    (if blocked?
      (rs/emit! (uds/unblock-shape id))
      (rs/emit! (uds/block-shape id)))))

(defn- element-icon
  [item]
