fixes

see diff, I fixed the revert function and some typo