Fix a index order bug