Fix issue with number of iterations