fix for with-credential destructuring problem #39