Fixes for SDF to template conversion.