fix parsing server replies.