fix a couple of bugs for substitutable resources in resource-driven orders