Fixing regressions because of dependency injection