fixed getSGMatrix