fix setChannel method and implement setAutoAck method