Update script.js

Bug fix