Fix the credentials caching problem