fix  credential provider code