Preserve channels when disconnecting

Resolves #41.