prevent trailing comma csv errors