Make sure all threads are definitely closed