fix index for query data