Inserted the sendUpdates() into the middleware. I also made sure that
the sendUpdates of the RMs are executed only when said transaction
exists (i did not do so before).