actually fix CSV generation