Added the code to clear the packet once the modem transmission is complete