Fix creation of temporary credentials