Fixes badgeBuilder

badgeBuilder otherwise will try to iterate over non-existant badges.