Ray query fix.