fix javascript syntax