fix includeHeading when metadata is null