Added automatic getting from socket.