fix JavaScript syntax error