Fixed a bug.
Changed behavior of matching error.