Fixed a couple queries