fixed message passing between server and client