Fix bug that prompts deletion for tasks deleted