fixed some issues with using .csv files