fix cleanup in machine action destroy