fixed problem with dependency injection