fix bug in script.js