error messages fix for tree