Fix an off-by-one with bounds.