Bug fixes in clear recovery