fix bug with first tree