added check on if contact is deleted