Fixes in csv generator