Fix hanging on URL parsing exceptions