Fix credentials sample code