fix a bug when recovery