Fixed up to_dict converting strings to numbers