fix endianness fetching error