Fixed a bug in CC detection