fix to_dict bug