Fixed circular dependencies check