How do I fix this behaviour my brain hurts

So I finished working on an inventory system and ended up working on equiping.
I came across this weird behaviour.

It works the first time when you equip, but when you unequip for the second or first time, this happens.

Here is the code

Player’s Slot Table (default)
image

it does occur on every time.