Url parsing fixes