Fixed some vertexArray and spritebatch bugs