Minor bug fixes to updateSGP