small query fixes.