fixed some code errors with the vertex-array demo