Fix off-by-one error when calculating cut-off