fix the bug : i is incorrect after remove a object