Undefined var fix