Linux

Fix Unix issues due to error in event loop closing.