fix bugs sending message to session server.