fixed race condition in set iterators