repairQuery