fixed javascript syntax