fixes iterator, Unit tests