Removes hash when retrieving the query string