Fixed endian error in unit tests