make sure when channel is freed, all connections have NULL chan to prevent access later