Fix load and save bugs in MainWindow