Revert exit function