fix NPE

not sure this will do it, but it is possible the 'newTransaction` is
causing the problem