Fix bugs in CMC module