Fixed storage of channel for sending messages and re-connecting
textbuffer.
Fixed reference to leave reason for closing channels.