Fixed some index errors.

yay