iterator correctly signals end