Resource guard change

this fixes #2683