fix set function