Fix name substitutions