Fix another off-by-one bug