numIterations bug fixed