Fixs "contains" behaviour

Issue #1041