Small Simulation fix

Used the wrong variable, causing the simulation to occasionally short circuit.  This is now fixed :)