Correct bug when deleting a new task