fixed thread exit -> threads are killed properly now