Mainlayout fix