Fix off by one error

We start counting from 1 until the last line, which will be
<= numVCells * NUM_LAYERS.

See #22.