fixing double subscripts