Cancel any existing query before starting a new one.