Fixed the generation of non-unique item ids and incorrect long and lat for new items