fix a index error