Cleanup MatchQuery