don't crash when match pattern is not well-formed