Fix cpd warnings