Fixes bug in pre-transaction balance check.