ensuring secret is str, fixing signing problems