try to fix the index error