Fixed bug in nth_match.