Fixed recursion issue with circular dependencies