Fix dependency injection bug.