fixes for getting the CSV file to work, closes #291