Fixed the double encoding of settings