improves injector to handle circular dependencies correctly