Fixed a bug of index