Bug fix from previous commit in getTargetSGP