No finished flag anymore.

Instead, we always use SortedFrom and SortedTo.
Caught an additional exception that might happen when quitting.