fix recovery

(cherry picked from commit 9a93015ea23f44156d6bb57b2febc168a8c5c217)