Make ResourceObject more fool-proof