fix a bug in calculating repeat conteng