fix bug in save_resume