fixing iteration comparison
Merging origin/dval/master-pending-iteration-fix into master