Yet more bugfixes for refactoring process
Merge pull request #960 from stloyd/resource-refactoring-2

Yet more bugfixes for refactoring process