Set function fixed and reimplemented