fix bug related to order of jQuery loading