Updated deleteSingle function.