fixed csv creation