fixes for query reindex.