Fix automatic badge awarding

Automatic badge awarding fixed.