Handle case of url_match being None... and other bugs