Fix original URL length calculation if has fragment and/or query string