My hacky 'fix' for the nested transaction problem