Fix errors in Tree