fixes substitutions