Issue fixed with building the tree on MS SQL and the new SQL