Bug fix from previous commit to updateSGP