fix mediator bug