NOJIRA fix mis-assigned variable

$vn_i is defined in the row above and is used below. This changes the variable.
Merge pull request #136 from kehh/misAssignedVariable

NOJIRA fix mis-assigned variable