badge bug fix