Fix when removing objects