Cover the case when we don't revert changes

Instead of using undefined variable.
Plus, rename the url variable to a more explicit name.