something strange happens

I have created 2 types of skeletons that spawn naturally, one with a 40% chance of spawning, and the other with 60%, but for some reason, it is giving me the helmet of the skeleton that spawns with 60%, this one has full leather armor red, and he is giving me his helmet, but not only to me, but also to the other 40% skeleton, who has iron armor, when I spawn that one everything is normal, but when I spawn another one for some reason he is equipped with the helmet of the first skeleton, if you need images of the code tell me
Continue to help post