fixed bug in CSV export