- fix some subtle issues in the iterators