Fixed undefined var