Update script.js

Fixed bug