Fixed some bugs in match_follows.