Fixed undefined variable notice.