fixed hanging constant with CSV generation