use adding `script` instead of `$.getScript`
fixed some bugs