fixing sockets issue