Fix Bugs

Fix Some Query Bugs....