Repair MainWindow and P3C.