fix the bug of iterator in location