Corrected num_cmps bug.