Fixed config saving urlencode

UNTESTED CODE! WARNING!