bug on filling trees fixed