fixed a problem in transformChannel()