fix off-by-one error in index_script.js