fix a case where a segment may get stuck in the terminate queue
2 files changed