bug fixes with leaving muc on connection loss.