fixed the intree bug