Fixed dependency injection issue