     (try
       (if-let [metabadge (fetch-json-data meta-data-url)]
         (let [processed-metabadge (process-metabadge ctx  metabadge assertion-url)]
-          (if (empty? (:metabadge processed-metabadge)) {} (assoc processed-metabadge :obf-url (get-in ctx [:config :factory :url])))))
+          (if (empty? (:metabadge processed-metabadge)) nil (assoc processed-metabadge :obf-url (get-in ctx [:config :factory :url])))))
       (catch Exception e
         (log/error (str "Did not get metabadge information: " assertion-url))
         (log/error (.getMessage e))
-        {}))))
+        nil))))
 
 (defn get-data [ctx assertion-url]
   (let [key (keyword assertion-url)]
+    ;(prn @metabadge-cache-storage)
     (cache/lookup (swap! metabadge-cache-storage
                          #(if (cache/has? % key)
                             (cache/hit % key)

                milestone-badge (:badge m)
                processed-required-badges (expand-required-badges ctx required-badges assertion-url)
                milestone-badge-info (if-let [info (public-badge-info ctx milestone-badge)]
                                       ;(let [image (or (fetch-image ctx (:image info) (:image info)))]
                                         (assoc info :image (fetch-image ctx (:image info))))
                ;milestone-badge-image (or (fetch-image ctx (:image milestone-badge-info) (:image milestone-badge-info)))
                is-milestone? (= assertion-url (:url milestone-badge))]
            (-> m
                (assoc :required_badges processed-required-badges :milestone? is-milestone?)

        {}))))

(defn fetch-image [ctx url]
  (let [ext (file-extension url)]
    (try
      (if-let [image (u/bytes->base64 (http/http-get url {:as :byte-array :max-redirects 5}))]
        (str "data:" ext ";base64, " image))
