fix ndata's endian