fix counter variable name