fix layout switch