Fixed a problem in generating follow sets