fix bugs; update channel test