Fixed how containment is performed