Fix off-by-one error with maintenance time calc