Fix an elementary bug of deleteTask in data handler