Fixed exporting values to csv