Do proper endian correction