Cap message length to prevent errors.