Fix layout hierarchy