Fix pattern matching in MC