Added check for missing fields.