Fixed broken query tester