fix a minor bug

- reason: random order of calling getJSON.
- solve: create a variable 'index' that points array number