fixing some bugs with the csv class