revert changes on page change