Fixed a bug that prevented the script from using jquery