correct CSV parsing and bugfix