Added purge in transmit thread