fixed wrong warning in sgs_Serialize