fixed iterators

iterators that weren't incrementing before are now incrementing,
avoiding infinite loops.