Fixed bug in MatchToGen