fix revert patched for legacy