corrected external iterator bugs