Fixed message parsing in client and server.