Fix end tag in js document