fixed js issues in script.js