fix compilation problem. Add code to manage DONE message after ACK. Still to be verified.