fixed daemon kill before threads are spawned