Transaction fixes

fixes for #46