fix intensity set function