Fixed the problem with the CSV generation.