Tweak matching logic