fixing csv generator