Remove an extra EndQuery