Fixed CSV header writing.