Fix transaction

this pullreq will fix #22.
first, commands of transaction execute, and then they change flags.