fixed bug in url parsing