fix find cycle bug