Fix the dictionary structure.