Bug fix from previous commit for testSGP(2d)