fix NPE

not sure this will do it, but it is possible the 'newTransaction` is
causing the problem
Merge pull request #116 from tbarker9/fix-npe

fix NPE