Fix to_csv