Fix bug with leaving. Fix bug with create and join