Toggling state of the badge, but flickering