Fixed error when jquery was loaded