Robot picks the wrong component

Hey, i have a question i have written code for a robot to pick products from a conveyor to an index table I need it to place 6 and then lift one of the index table to another conveyor and replace that product on the index table. However, now it places one product then lifts the index table, do i need to create a new variable or something for the products to avoid this ?

This is the code

You could check the detection volume of the tool frame being used for the grasp action (in the robot’s properties, under Actions Configuration).
If it’s too high, the table might be detected as well as the part and grabbed too.

I tried to change the detection volume to be lower however, the same issue occured