Fixed recursive dependency injection bug