fixed the socket problem