fixed syntax errors in .js file