fix sending message to server