fix iterator in insert.