fixed problem with dependency injection

the dependency injection did not work in distributed state