Fixed issue#3 (CSV generation)