Fix python 3 support inside PatchedTransaction (relates to issue #139)