Fix bug related to item duplication