Fixed URL encoding for query params. See issue #318