Fixed a bug when inserting inside remove events.
Fixed a bug when inserting inside remove events.