fix buggy Safari iterators