Fix tree encoding to save more bits
Fix tree encoding to save more bits