Fix duplicate issue when updating a task with a list selected