Fixed javascript syntax warnings