fix segv when closing terms in splits