Fix deleted objects handling