fixed errors in csv reader