Fix uncatched exception and save the URI supplied