improved card badge toggling.