Fix off-by-one. Thanks, Gabor!