fix handling of deleted objects