clearing
correct number of iterations
fixed #19