Fix intance of UrlGenerator being replaced