fixed csv headers generating code