fix data check when adding to resource envelope