fixing an off-by-one error

which for some reason hasn't caused any damage, but should get fixed
anyhow