Fixed code that downloads CSV files.