Improving string matching comparison.

Fixes #2