fixed sgs_PushHandle to support NULL handles