Improved handling of malformed replies.