Badge bug fixes