Added circular dependency handling