replaced variables so that the target is resolved correctly