fix hierarchy hashmap