final (hopefully) fixes for cross platform endian