Update flatten tree