fix foo[index]