Fixed undefined error for missing jQuery