error correction in query