Bugfixes

My attempt at getting threads to close properly.