Fixed bug when an objected was being deleted before time