making keys only queries work correctly
Merge pull request #690 from shatterednirvana/fix-keys-only-queries

making keys only queries work correctly