- better transaction handling
Merge pull request #14 from afabiani/master

 - fix transaction handling