Fixed issue with final peer not exiting properly