Fixed a bug where editing a transaction would lead to unset variables.