fixed layout save and restore for main form