A few bugfixes

TCPListener always gets closed
Stopping the thread now really attemps to stop everything