Fix for SSO triggered from a non-UI thread.