fix errors in transact