The global state of the system needs to be changed in Nozzle_change() and not in each high level function like Dispense(), etc.