do cleanup before calling listeners on transactionCompleted()