fix crash if 'save_all' failed twice