bug in the counter of the badge, so if the counter is less than 0 set to 0