fix bug with updating the nodey tree