Fix InstanceMatcher
Added pattern matching