handle circular dependencies