Fix some issues caused by jquery version upgrade