Fixing logical errors in transaction protocol