temp fix to the socket thread safe issue