fix CRC7 implementation