update some elements that had duplicate keys