Fixed crash when selecting Next button in main window.