added support for query strings in proxy mode