Fix off-by-one.