Fixed exception handling when using a bad URL.