Fix encoodeURIComponent calls