Fix a bug in restore