Fix object delete issues.