fix of undefined var