Fix deleting of tasks.