fixed the order that the vertices are rendered