correcting iteration step count