fix dependency injection issue