made emits happen after the transaction is done, to avoid sending half assed messages in the middle of a transaction