Fixed incorrect endian conversion in ReadStruct