Fixed a bug in the CSV export feature.

Fixed a bug in the CSV export feature.