iterator and datasource fix, iterator tests fix