nextNode nextTree fixes (but still has a leak)