Fixed MainFrame class.