fixing duplicated error messages in tree