fix contains directives