fix: make the ATG wait for running transactions to be stopped