Fix for missing metadata during template generation.