fixed a bug in index file