Fixed Stencil off-by-one error