Added nchannel check. Fixes issue #147

Fixes #147