removed counter reset math breakage