Fixed undefined var notice