fix unclosed js