bug fixes for recover