fix critical scoping error when forming environment/path in execute resource