Added revert button behavior