fix set_value method