fix UnboundLocalError in machine actions

raise what?