Fixed JS syntax errors