fix urlencode call