handle querystring properly