fixed the removal of the objects