Terminate daemon threads