Fixed a null pointer error when disabling a machine