Fix main window overflow issues.