js syntax error fix