fixing iterator