Fixed some CCS bugs