Bugs: lost ACKs and >999 packets fails

Fixed transmission fail bugs:
- lost ACKs stop transfer
- having more than 999 HEX packets stops transfer