Drag And Drop In Inventory Makes Items Dissapear!

Hello. I’ve made an inventory system and for the last 5 days i’ve been trying to do Drag And Drop. I got most things to work but at Random times if the item is > 1 then it sometimes dissapears when i try to move it. Here is a video for reference.

I have 3 things going on right now for drag and drop:

  1. Left Click drag: Moves item to different slot.
  2. Middle Click drag: Splits the items to a different slot.
  3. Right Click drag: Takes only one item and puts it in a different slot.

(In the video i was only using Left Click but the problem can occur with the rest too.)

I’m am doing that in 3 Overidable Functions:

  1. OnPreviewMouseButtonDown
  2. OnDragDetected (Paste Bin creates a giant node in the end so here is a screenshot of that)
  3. OnDrop (The MoveItemToSlot function contains this)

I’ve been struggling with this for days now so if anyone can help i would really appreciate that. I suppose that its something wrong with the branches but i don’t know.

Thanks in advance!