Fixing java lobby's bugs. Almost fully tested.