Fix sloppy multithreaded client