added support for ACK and fixed compile warnings