Integration test and recovery bug fix