Corrected logic errors in transaction protocol