fix for resetting masking counters