Fix off-by-one (maybe, I'm not sure anymore)