Fix implementation of recover and implement failed