fixed IndexBuffer crashing