Fixed divide by 0 bug
Changed addVertices