Made substitutions stay within page