Bug fix for updateSGP