Fix issue with dependency injection.