Fixed the bug in match-bug.hs and moved it to test case in test.hs.