Fix the handling of last CM.