prevent the path and query from swallowing query,fragments and fragments