Adding the removeall parameter to the thread instruction. The instruction exit now calls thread instead of removing all the threads itself.