Fixed endian bug