Fix recovery race conditions.