fix variables replacement on subcomponents