added validity check for used resource with containers