fixng bug where user got email before they published a badge