fix recovery bug