Hopefully fixing the array index out of bounds in GLState