Bug fix in getPreferredSGP