Fixed an issue with sockets