bug fixes in crc when bit length is not 8.