Fixed iterator.py for using new iterator interface.