Fix cpd detection.