Fixed issue where editing an item duplicated it