fixing iteration, misc fixes to tests (still not 100% fixed)