Fixed custom matchers.
Added regression tests for bug #2.