Fixed sign conversions in crc calculation