Improve destroyMachine.