Tests for fixing bug in match