fixing an off-by-one error

which seemed to have done no harm, but should get fixed anyway