main.js displayTable bug fix - reference beyond end of array error