Fix bug: all index are the same