Fixed object removal bug.