Fixed wrong number of iterations.

There were always one too much iterations than configured.