Fixed bug in CredentialManager class. Thank you unit tests!