Logic bug on a blueprint for a shop simulator

Hi,
I have a logic bug on this blueprint, busically I don t get the results I should get.
I will describe what it does cause nodes are in my lenguage so probably you wont understand what I wrote.
Basically all start from a trace line by channel(you don t see)(the traceline is because the box shot a ray for refilling the shelf and it need to it the slot) and go to cast to slot(that basically is the shelf slot for products in the store), then I do some check that are
1)the shelf slot is empty?if yes it overwright the name of the product and the “ideal price”
if not it do the sencond check
2)is the product present in the slot is the same of the box refil then it just go to the refill code else it print a debug line that say that is already occupied

then we have the refill code that is the part were I have the actual bug, basically what I did is to subtract the max slot space to the slot space avaliable(cause you can refill also if you have some product left), it get the min between the result and the remaning box product and then just set the quantity on the shelf with result of the min + quantity on the shelf
Then there is the check for the box that subtract the min to the box quantity and if the result is 0 or less(should not) it destry the box.
The problem is that, if like in picture, the box never get destroyed and the box stall at max quantity of the box and the quantity of the shelf and box are identical, while if I put a sequence on the 2 set the box get destroyed indipendently if is empty or not and still math is not done propierly