fix bug at setting value