Fixed error thrown when deleted objects exist