Notice: Undefined variable: ub in