Fixed UDP packet loss on local machine with termination-packet-flag