fix small bug in judge querying