More robust tree layout