When having a super/subscript with multiple characters, all characters must be grouped together.
For example if you want to type
a
ij
you need to use the LaTeX
a_{ij}
instead of
a_ij
.