Fixed a bug in how csv files are read.