Make it clearer what's happening on exit Fixes #665