fix dependency injection problem