Fix the tree with an error message when there is no snippets