Fix thinko in automation write undo.