fix a mistake in big endian conversion