Fix variables in resource match.