diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 95b05cef6f5..9752fd56dfb 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -157,6 +157,13 @@
coin = W
user << "\blue You insert the [W] into the [src]"
return
+
+ else if(src.panel_open)
+ for(var/datum/data/vending_product/R in product_records)
+ if(istype(W, R.product_path))
+ stock(R, user)
+ del(W)
+
else if(istype(W, /obj/item/weapon/card) && currently_vending)
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
@@ -169,11 +176,7 @@
usr << "\icon[src]Unable to connect to linked account."
else
usr << "\icon[src]Unable to connect to accounts database."
- else if(src.panel_open)
- for(var/datum/data/vending_product/R in product_records)
- if(istype(W, R.product_path))
- stock(R, user)
- del(W)
+
else