make util normalize_dict more robust