fix a bug in CMT's codebase