iter: more unit tests and bug fixes