[minor] fix minor mistake in script.js that caused the crashes in chrome