fixed a bug of crash caused by channnel.create()