Fixed issue with multithreaded clients