Fix badges bug