diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 48892273f7a..9d6337baf4a 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -363,7 +363,7 @@
user << "You can't use the [src.name] while it's panel is opened!"
return 1
- if(istype(I, /obj/item/weapon/reagent_containers) && (I.flags & OPENCONTAINER))
+ if(istype(B, /obj/item/weapon/reagent_containers) && (B.flags & OPENCONTAINER))
if(beaker)
user << "A beaker is already loaded into the machine!"
return