Improve matching.
Merge pull request #395 from nZEDb/dev

Improve matching.