avoid zombies by detaching the threads
added RTT simulation support