fix bugs in parsecsv - what happens if there is no comma at the end?
small bugfix

Sometimes arccos seems to produce a nan - which shouldn't happen. This is
probably due to some formatting changes. Ignoring for now.