Fix IndexOutOfBoundsException with spectating