Fix recovery part of the script