Added object deletion handling.