Correction constructor and destructor in MainWindow