Upgrading preserve_resources method to work with 0.19.1 and also simplifying it.
Merge remote-tracking branch 'origin/preserved-resources-0.19.1'