Fix potential crash caused by channels4()
Merge pull request #187 from b52/master

Fix potential crash caused by channels4()