Fixing problem with SM authentication.