fixing the url parsing