prevent counter badge overflow