Fix bug in getCGP