enforce hierarchy-sentences to end appropriately.

Shall fix #1100.