MachineStateModal: State change fixes