About HP% bonus

i thought i figured out how to make it work in game, i guess there is more to it then what i did in exp_system.lua file.
Any idea about problem causing game to halt and little hourglass icon to stay forever when enemy human range unit get another turn with fighting spirit (posts #115 , 121 in this tread)?