fixes to iterators and filter functions