fix off-by one typo
fix off-by one typo in comment aswell