Oops, forgot to fix an off-by-one error in sample