JS syntax error fix