fix JS syntax error