better bad commit recovery