fix to CSV export with number of columns