Fix issue with acknowledge packets

Library would lose connection after 128 packets were received from the
server.