While parsing an xml file, I normalize values and save them via swap! into an atom. Additional I build a tree to reflect the original structure.

When I call the function, it returns only a part of the data, but not the normalized values. When I deref the atom, the data is completely written. 

Here the parts of the code, which seems to be critical to that behaviour. 

```
(defn normalize-values
  "Save the dataset to the atom and returns the reference"
  [tour-id key value]
  (swap! db assoc-in [tour-id (query-key key :name) value] {:title value})
  {key [(query-key key) value]})

(defn extract-tags
  "Differs between unique and normalizable values"
  [node tour-id]
  (let [data (zip/xml-zip node)
        key (:tag node)
        value (zx/xml1-> data key zx/text)
        res (if (some #{key} [:sound :map :video :creator])
              (normalize-values tour-id key value)
              {key value})]
    res))

(defn panorama->map
  "Creates a panorama map from the xml data"
  [node tour-id]
  (let [xml-node (zip/node node)
        tag-values (into {} (map #(extract-tags % tour-id) (:content xml-node)))]
    (merge tag-values
           {:id     (get-file-id (:file tag-values))
            :hidden (read-string (get-in xml-node [:attrs :hidden]))})))

(defn menu->map
  "Loops over the xml tree and builds the structure"
  [tour-id menu]
  (for [entry menu]
    (let [children (childs-of-child entry)]
      (if (not-empty children)
        (let [{:keys [id] :as category-map} (category->map entry)]
          (swap! db assoc-in [tour-id (query-key :categorie :id) id] category-map)
          {:loc      [:categories/by-id id]
           :children (menu->map tour-id children)})

        (let [{:keys [id] :as panorama-map} (panorama->map entry tour-id)]
          (swap! db assoc-in [tour-id (query-key :pano :id) id] panorama-map)

          {:loc [:panos/by-id id]})))))

(defn parse-menu
  "Starting function which resets the db and saves all data to the atom "
  [path id]
  (swap! db dissoc id)
  (logging/debug "Parse Menu: " path)

  (let [xml (xml->map path)
        menu-data (menu->map id (:content xml))]

    (swap! db assoc-in [id :title] (tour-title xml))
    (swap! db assoc-in [id :tree] menu-data)

    (get @db id)))

```

How can I realize, that the atom is resolved correctly?