Fixed a problem in the csv export for bug #8365.