Makes sure bogus urls don't lead to an exception. Fixes #3