Fix the channel allocation bug/assumption (issue 800).