Fixed iter_classes by removing some useless code.