lifesteal bug

Hello,
I recently encountered this situation:
I was playing a lvl 10 vampire with 12 levels of lifesteal. This should heal me for 120hp per hit.
I had 38% magic resist.
I attacked a mage monster that did 151 magic damage.
I had 1 level of corrosion.
I was not cursed.
I was at near full health as was the mage monster.
Without calculating the exact damage, the mage should be doing about 100 to me after all resistances are considered.
I should be healing 120. Therefore I should gain about 20 hp.
However the result of the combat was me taking about 20 damage, I cant remember exactly how much.
Why???
Also lifesteal seems kinda messed up in general, like sometimes you take damage instead of overhealing after a certain amount of hp, and when you kill something often the lifesteal doesnt happen at all. I dont know if this is intentional or not -there doesnt seem to be any information about how it works- but its certainly not intuitive and seems a bit broken.
Anyway could you please fix it or explain to me how it isnt broken so I can understand how to play it?
Thanks.
I love you guys.
I recently encountered this situation:
I was playing a lvl 10 vampire with 12 levels of lifesteal. This should heal me for 120hp per hit.
I had 38% magic resist.
I attacked a mage monster that did 151 magic damage.
I had 1 level of corrosion.
I was not cursed.
I was at near full health as was the mage monster.
Without calculating the exact damage, the mage should be doing about 100 to me after all resistances are considered.
I should be healing 120. Therefore I should gain about 20 hp.
However the result of the combat was me taking about 20 damage, I cant remember exactly how much.
Why???
Also lifesteal seems kinda messed up in general, like sometimes you take damage instead of overhealing after a certain amount of hp, and when you kill something often the lifesteal doesnt happen at all. I dont know if this is intentional or not -there doesnt seem to be any information about how it works- but its certainly not intuitive and seems a bit broken.
Anyway could you please fix it or explain to me how it isnt broken so I can understand how to play it?
Thanks.
I love you guys.