fixed warnning undefined var