Add more tracing for channels and windows. Fix channels going to wrong window when server was disconnected and window swapped with another window.