Last packet lost issue resolved
Merged code