Fixing variable replacements.