fix dictionary key duplication