fix bugs in index size and read id data type