Crafting with multiple stacks

Hello, I got a little problem
so I’m making a crafting system and I Found one issue
if the crafting recipe says that you need 5 wood and the player has 1 one stack of 3 wood and another stack with 2 wood, it just won’t craft I fixed but now comes the next problem
I have another Test recipe that needs 1 barrel and 2 sheet metal, I have 3 barrels and 1 stack of 2 sheet metal and 1 stack of 1 sheet metal but now comes the problem
if I want to craft the item, it takes all the sheet metal
here is an image with the debug text

and here the blueprints