Fix cred creation and setting and typo