                                          (log e)
                                          (.printStackTrace e)
                                          (throw e)))))
-                         new (-> new* :edn-value read-string (get-in rkey))]
+                         new (-> new* :edn-value read-string-safe (get-in rkey))]
                      [old new])) doc 0))))))
 
 


                :else
                ((fn trans [doc attempt]
                   (let [old (-> doc :edn-value read-string (get-in rkey))
                         new* (try (cl/update-document db
                                                       doc
                                                       (fn [{v :edn-value :as old}]
                                                         (assoc old
                                                           :edn-value (pr-str (if-not (empty? rkey)
                                                                                (update-in (read-string v) rkey up-fn)
                                                                                (up-fn (read-string v)))))))
                                   (catch clojure.lang.ExceptionInfo e
                                     (if (< attempt 10)
                                       (trans (cl/get-document db (pr-str fkey)) (inc attempt))

                       pr-str
                       (cl/get-document db)
                       :edn-value
                       read-string-safe)
                  rkey))))
  ;; TODO, cleanup and unify with update-in
  (-assoc-in [this key-vec value]
