Stripping out the query string when parsing returned url