Bugfix: transposed the channel array during write.