Fix iterator location bug