Fixed bug with stepcounter.