Fix encoding of query params