Fix tag nesting in layout