fix deletion of old resources
Merge pull request #2190 from fstagni/fixDeletionOldRes

[v6r11] Fix deletion of old resources