Undefined offset fix

Fixed undefined offset caused by lookaround