Fixing problem when saving a new item.