I see why you have written the workers the way you have now, that's helpful. One problem is that values from getAttrs(attributes) are always strings, and need to be coerced into numbers before you can do mathematics or logical tests on them reliably. Also your second worker is redundant. You should include hp in the change event of the first worker. Then you dont need a separate function to calculate the wound modifier (you can still use one, but its not necessary). Finally you are sending all the attributes to the figureWounds function, and then setAttrs. You dont need to send the body, mass, mind, etc in this way. They never change so shouldnt be sent to setAttrs. Here's one way to rewrite it. on('change:body change:mass_scale change:mind change:will change:agility change:hp',(event)=>{ getAttrs(['body','mass_scale','mind','will','agility','hp'],(attributes)=>{ let setObj = {}; setObj.hp_max = (10*attributes.body||10) + (10*attributes.mass_scale||10) + (attributes.mind*1||1) + (attributes.will*1||1) + (attributes.agility*1||1); setObj.hp = +attributes.hp || 0; let hpPercent = setObj.hp / setObj.hp_max; setObj.blessure = (hpPercent <= 0.5) ? 1: 0; setObj.blessure_grave = (hpPercent <= 0.25) ? 1: 0; setObj.inconscient = (hpPercent <= 0) ? 1: 0; setAttrs(setObj,{silent:true}); }); }); Note that you should create a separate object for the setAttrs command - dont use your original attributes. Get values out of it, convert them into the format you need (not strings), and create a new object that contains only the values you need saving. If you want to keep the external function, you could do this on('change:body change:mass_scale change:mind change:will change:agility change:hp',(event)=>{ getAttrs(['body','mass_scale','mind','will','agility','hp'],(attributes)=>{ let setObj = {}; setObj.hp_max = (10*attributes.body||10) + (10*attributes.mass_scale||10) + (attributes.mind*1||1) + (attributes.will*1||1) + (attributes.agility*1||1); setObj.hp = +attributes.hp || 0; setObj = figureWounds(setObj); // or you could use Object.assign within the function as you did, I'm just illustrating different methods. setAttrs(setObj,{silent:true}); }); }); let figureWounds = function(obj){ let hpPercent = obj.hp / obj.hp_max; obj.blessure = (hpPercent <= 0.5) ? 1: 0; obj.blessure_grave = (hpPercent <= 0.25) ? 1: 0; obj.inconscient = (hpPercent <= 0) ? 1: 0; return obj; }; I think I got the blessure/grave/inconscient values correct, you might want to check those.