Fixed a small problem in SG