teiiddes-1732: Corrrected CP logic
Merge pull request #176 from tejones/teiiddes-1732

teiiddes-1732: Corrrected CP logic