fix dependency injection for inherited fields/methods