Test bswap and fix bug.