fix bugs for step counters