fix more restoration bugs