Fix problem with event channels not getting disconnected