Syntax correction in .js script