fix bit inversion on CSV/PY exports