query fixes.