fixing an error on adding sockets