fix javascript syntax error