Fixed bug where wrong thread was started in client