Bug fix to getPreferredSGP