Fixed error causing dependency injection warnings