Fixed iteration-numbering bug.