fix type in storeCredential