optimize(ex4): terminate some unterminated statements