Fixed wrong number of iterations.

There were always one too much iterations than configured.
Merge pull request #73 from h4cc/patch-1

Fixed wrong number of iterations.