query fix