cleanly close the threads before closing