Fix up credential building