- fix the index out of range:7 bug