fix the tricky tree bug