Vacuum at gripper still on after the deliver the box at pallet

I am facing an issue with my robot, is work well and random the vacuum at gripper still on after deliver the box at pallet, if yoi have any idea to help I will be grateful. thanks

Case 109
‘-------------------------------------------------------------------------------------------------’
‘Turn off vacuum and count box as placed’
If Sys_StateONS
Sys_Timeout≔0
fun_SetVacuum( False )
If not (Vacuum_Made_Z1 or Vacuum_Made_Z2)
Sys_Timeout≔0
Call UpdatePayload
Wait: 0.3
Increase current box count, total box count, total pallet counts
If Sys_Pallet≟1
temp≔133
Else
temp≔134
write_port_register(temp,read_port_register(temp) + fun_PickCount())
temp_BoxCount≔read_port_register(200) + fun_PickCount()
If temp_BoxCount ≥65536
temp≔read_port_register(201) + 1
temp_BoxCount≔temp_BoxCount-65536
write_port_register(201,temp)
write_port_register(200,temp_BoxCount)
Sys_State≔110
Else
Sys_Timeout≔Sys_Timeout+0.05
Wait: 0.05
If Sys_Timeout>0.5
write_port_register(129,14)
Sys_State≔990
Case 110