Debug only if a tx is set. Fixes #134