saving all changes before revert