fix arbitrary querystring handling