                                                           [:phrase
                                                            [:chunk.chunk (str (t :user/Loginaddress ul)": ")] [:chunk (str (:primary_address e))] "\n"]
                                                           )
-                                                        (when-not (blank? (:backpack_id e))
+                                                        (when-not (blank? (str (:backpack_id e)))
                                                           [:phrase
                                                            [:chunk.chunk (str (t :user/BackpackID ul) ": ")][:chunk (str (:backpack_id e))]]
                                                           )

                                                 (into [:paragraph] (for [pb $pending_badges]
                                                                      [:paragraph
                                                                       [:chunk.chunk (str (t :badge/BadgeID ul) ": ")] [:chunk (str (:badge_id pb))]"\n"
                                                                       [:chunk.chunk (str (t :badge/Name ul) ": ")] [:chunk (:name pb)]"\n"
                                                                       [:chunk.chunk (str (t :page/Description ul) ": ")] [:chunk (:description pb)]"\n"
                                                                       [:chunk.chunk (str (t :badge/Imagefile ul) ": ")] [:chunk.link (str site-url "/" (:image_file pb)) ]"\n"
                                                                       [:chunk.chunk (str (t :badge/Assertionurl ul) ": ")] [:chunk.link (:assertion_url pb)]"\n"
                                                                       (when (not-empty (:tags pb))
                                                                         [:phrase
                                                                          [:chunk.chunk (str (t :badge/Tags ul) ": ")] [:chunk (join ", " (:tags pb))]"\n"])
                                                                       [:chunk.chunk (str (t :badge/Badgevisibility ul) ": ")] [:chunk (:visibility pb)]"\n"
                                                                       [:chunk.chunk (str (t :badge/Issuedon ul) ": ")] [:chunk (str (date-from-unix-time (long (* 1000 (:issued_on pb))) "date") ", ")]
                                                                       (when (:expires_on pb)
                                                                         [:phrase
                                                                          [:chunk.chunk (str (t :badge/Expireson ul) ": ")] [:chunk (str (date-from-unix-time (long (* 1000 (:expires_on pb))) "date") "")]])
                                                                       [:spacer 0]]))])

                                                                                                               [:chunk.chunk (str (t :badge/Assertionurl ul) ": ")] [:chunk.link (:assertion_url more-badge-info)]"\n"
                                                                                                               [:chunk.chunk (str (t :badge/Assertionjson ul) ": ")][:chunk.link (:assertion_json more-badge-info)]"\n"

                                                                                                               (when-not (blank? (str (:rating more-badge-info)))
                                                                                                                 [:phrase
                                                                                                                  [:chunk.chunk (str (t :badge/Badgerating ul) ": ") ] [:chunk (str (:rating more-badge-info) "  ")]])
                                                                                                               (when-not (blank? (:evidence_url more-badge-info))
