revert query changes