Fixing off-by-one error in example