Correcting query