Fix nasty bug caused by wrong order of address substitution