fix restore_files