Fix as_dict.