fix a problem in sso function