Fixes crash when a partner disconnects (one occasion still crashes - gotta debug further), many more improvements.