Fix incorrect iterator comparison
Merge pull request #29 from jasalamanca/r1.1.4

Fix incorrect iterator comparison