Fix die off-by-one