minor bug fix on dependency injection