Fix bug in csv