Correction of typo and bug in getPreferredSGP