Fixes #1

Incorrect array index calculation in vertexdy calculation.