Fixed bug with disconnections, fixed exception when closing GUI client early, server shuts down properly