Actually it's a known problem. You see, there is two ways to close chat window:
1. Using browser's window close button.
2. Using close button in the chat window.
The first way in more general for users but it does not close thread. You've attached a screen shot illustrating this case.
The second way is really close the thread but not all users/operators use it.
The bad news are there is no way to automatically close left threads in Mibew 1.6.x. I can only suggest your operators to click on close icon in the chat window to force threads closing.
At the same time the problem is fixed in Mibew 2.x, left threads are closed by timeout there.