fix small bug in has_cm