Fix transfer bugs in Mediator and WSClient