fix tree selection order