SSO fix based on reverted master