revert rc script and fix recovery errors