Fix iterators for OS X