Merge pull request #525 from leider/master

resources cleanup (internal)