fixed js syntax error