Fix initialization of MainFrame and related panes.