Fixing the off-by-one for real this time