Fix closing tag issues with layout