Fix .csv functionality