Fix duplicate keys