Bug fixes for testSGP(2d)