Fix off-by-one to quench exceptions