fix tree height issue