Fix querying on single index
Fix indexing, test queries