Exchange query fix