Tree expansion bug fixed