big endian fix (untested)