                               ))
         ws-diff (:ws-behaviors @workspace/current-ws)
         final (if (and ws-diff (not (empty? ws-diff)))
-                (behavior-diff (safe-read ws-diff "workspace.behaviors") final)
+                (behavior-diff (parse-behaviors (safe-read ws-diff "workspace.behaviors")
+                                                "workspace.behaviors")
+                               final)
                 final)]
     (reset! object/negated-tags (or (:- final) {}))
     (reset! object/tags (or (:+ final) {}))))

          :reaction (fn [workspace old]
                      (let [old (:ws-behaviors old)
                            old (when-not (empty? old)
                                  (reader/read-string old))
                            neue (:ws-behaviors @workspace)
                            neue (when-not (empty? neue)
                                   (reader/read-string neue))]
                        (when old
                          (apply-diff (reverse-diff old))
                          (refresh-diffed old))

         (sort-by first)
         (vec))))

(defn parse-behaviors [behs file]
  (cond
     (map? behs) behs
     (vector? behs) (flat-behaviors->map behs)
     :else (console/error (str "Invalid behaviors file: " file ". Behaviors must be either a vector or a map."))))

(defn parse-file [file]
  (parse-behaviors (-> (files/open-sync file)
                       :content
                       (safe-read file))
                   file))

(defn pprint-flat-behaviors [flat]
  (-> (reduce (fn [result cur]
