fix duplicate hashmap key bug