Fixed CSV generation